feat: add PWA support and local launch scripts#1422
Conversation
PWA: manifest, service worker with game-aware caching (cache-first for assets/WASM/models/audio, stale-while-revalidate for app shell/data), install prompt UI, Apple web app meta tags, placeholder icons. Launch scripts: play.sh (macOS/Linux) and play.bat (Windows) in launch/ folder — auto-installs deps, starts server, opens Chrome/Edge in --app mode for a native-feeling window. Supports dev and prod modes. https://claude.ai/code/session_0172J363kooEWWteTsyt5yU8
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: a15c486847
ℹ️ About Codex in GitHub
Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you
- Open a pull request for review
- Mark a draft as ready
- Comment "@codex review".
If Codex has suggestions, it will comment; otherwise it will react with 👍.
Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".
| async function cacheFirst(request, cacheName) { | ||
| const cache = await caches.open(cacheName); | ||
| const cached = await cache.match(request); | ||
| if (cached) return cached; |
There was a problem hiding this comment.
Revalidate cached game assets after deploys
The cache-first strategy returns the cached response immediately and never re-fetches the same URL, so users who already cached /wasm, model, texture, or audio files will keep serving stale bytes indefinitely unless the cache key is manually bumped. Because this commit also hardcodes CACHE_VERSION = 1, any asset updated in-place (same path, new content) can remain permanently outdated for existing installs, which can cause runtime mismatches after releases.
Useful? React with 👍 / 👎.
|
|
||
| REM Kill the server | ||
| taskkill /fi "WINDOWTITLE eq VOIDSTRIKE Server" >nul 2>nul | ||
| taskkill /f /im node.exe >nul 2>nul |
There was a problem hiding this comment.
Terminate only the launched server on exit
This shutdown command kills every node.exe process on the machine, not just the VOIDSTRIKE server started by this script. In practice, pressing a key to exit the launcher will also terminate unrelated local Node services (other apps, dev servers, tooling), which is destructive behavior for users who run multiple Node processes.
Useful? React with 👍 / 👎.
PWA: manifest, service worker with game-aware caching (cache-first for assets/WASM/models/audio, stale-while-revalidate for app shell/data), install prompt UI, Apple web app meta tags, placeholder icons.
Launch scripts: play.sh (macOS/Linux) and play.bat (Windows) in launch/ folder — auto-installs deps, starts server, opens Chrome/Edge in --app mode for a native-feeling window. Supports dev and prod modes.
https://claude.ai/code/session_0172J363kooEWWteTsyt5yU8